home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Mouse44.pxl < prev    next >
Text File  |  2001-09-26  |  6KB  |  208 lines

  1. Initialize:
  2.     UseCoordinates(PIXEL)
  3.     UseBackGround(TRANSPARENT,192,192,192)
  4.     DrawBackGround
  5.     WaitInput(100)  {let NT and 95 catch up}
  6.     InfoMenu(REMOVE)
  7.     SetMenu()
  8.     Title$ = "Mouse Modes in PiXCL"
  9.     UseCaption(Title$)
  10.     WinLocate(Title$,200,100,720,500,Res)
  11.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  12.     DirGet(SourceDir$)
  13.  
  14.     SetMenu("E&xit!",Leave,
  15.         ENDPOPUP,
  16.         "&Modes", MouseModes,
  17.         ENDPOPUP,
  18.         "&Help",IGNORE,
  19.         "&Concept",Concept,
  20.         "&View Source",ViewSource,
  21.         "&About",About,
  22.         ENDPOPUP)
  23.  
  24.     DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 0,0,255, TOPBOTTOM)
  25.  
  26.     StatusWindow(ENABLE,BOTTOM,1,250,0,0,0)
  27.     UseFont("Arial",11,25,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  28.     tx2 = cx2 - 20 ty2 = cy2 - 20
  29.     DrawTextExt(20,20,tx2,ty2,
  30. "PiXCL provides you with twelve different mouse modes, which can all be used simultaneously. Double Left/Mid/Right mouse should not overlap with other Left/Mid/Right  mouse modes as these take precedence.",LEFT)
  31.     
  32. Wait_for_Input:
  33.     WaitInput()
  34.  
  35.  
  36. Leave:
  37.     End
  38.  
  39. Concept:
  40.     MessageBox(OK,1,INFORMATION,
  41. "Select the 'Modes' menu item and a set of eight boxes
  42. are drawn, for the different mouse modes. Each box is
  43. identified with the particular mouse, and when this mouse
  44. button is clicked, a small icon is drawn in the box to 
  45. indicate that the mouse click has been processed. The 
  46. fifth column boxes are to demonstrate that all mouse modes, 
  47. with the exception of Double Clicks, can be used in the
  48. same overlapped region.
  49.  
  50. Note that a Left/Mid/Right Mouse supercedes Double 
  51. Left/Mid/Right Mouse in the same region.",
  52.     "Mouse Modes in PiXCL 4.40",Res)
  53.     Goto Wait_for_Input
  54.  
  55. ViewSource:
  56.     PXL_File$ = SourceDir$ + "\mouse44.pxl"
  57.     Cmd$ = "notepad " + PXL_File$
  58.     Run(Cmd$)
  59.     Goto Wait_for_Input
  60.  
  61. About:
  62.     AboutUser("Mouse Modes in PiXCL 4.40",
  63.     "Sample PiXCL 4.40 program", 
  64. "The twelve left, mid and right mouse input modes available
  65. in PiXCL 4.40 are demonstrated in this program.")
  66.     Goto Wait_for_Input
  67.  
  68. MouseModes:
  69.     DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 0,0,255, TOPBOTTOM)
  70.     UseFont("Arial",7,13,NOBOLD, NOITALIC, NOUNDERLINE, 0,0,0)
  71.     DrawRectangle(401,1,500,100)
  72.     DrawTextExt(401,5,500,100,
  73.         "All Left modes except double.",CENTER)
  74.     
  75.     DrawRectangle(401,101,500,200)
  76.     DrawTextExt(401,105,500,200,
  77.         "All Right modes except double.",CENTER)
  78.     
  79.     DrawRectangle(401,201,500,300)
  80.     DrawTextExt(401,205,500,300,
  81.         "All Middle modes except double.",CENTER)
  82.     
  83.     {===== Row#1: Left Mouse Modes =========}    
  84.     DrawRectangle(1,1,100,100)
  85.     DrawText(5,5,"Left")
  86.     SetMouse(1,1,100,100,Mouse1,X,Y,
  87.           401,1,500,100,Mouse1,X,Y)
  88.  
  89.     DrawRectangle(101,1,200,100)
  90.     DrawText(105,5,"Shift Left")
  91.     SetShftMouse(101,1,200,100,Mouse2,X,Y,
  92.                        401,1,500,100, Mouse2,X,Y)
  93.  
  94.     DrawRectangle(201,1,300,100)
  95.     DrawText(205,5,"Ctrl Left")
  96.     SetCtrlMouse(201,1,300,100,Mouse3,X,Y,
  97.              401,1,500,100, Mouse3,X,Y)
  98.  
  99.     DrawRectangle(301,1,400,100)
  100.     DrawText(305,5,"Dbl Left")
  101.     SetDblMouse(301,1,400,100,Mouse4,X,Y)
  102.  
  103.     {===== Row#2: Right Mouse Modes =========}    
  104.     DrawRectangle(1,101,100,200)
  105.     DrawText(5,105,"Right")
  106.     SetRightMouse(1,101,100,200,Mouse5,X,Y,
  107.         401,101,500,200,Mouse5,X,Y)
  108.  
  109.     DrawRectangle(101,101,200,200)
  110.     DrawText(105,105,"Shift Right")
  111.     SetShftRightMouse(101,101,200,200,Mouse6,X,Y,
  112.             401,101,500,200, Mouse6,X,Y)
  113.  
  114.     DrawRectangle(201,101,300,200)
  115.     DrawText(205,105,"Ctrl Right")
  116.     SetCtrlRightMouse(201,101,300,200,Mouse7,X,Y,
  117.              401,101,500,200, Mouse7,X,Y)
  118.  
  119.     DrawRectangle(301,101,400,200)
  120.     DrawText(305,105,"Dbl Right")
  121.     SetDblRightMouse(301,101,400,200,Mouse8,X,Y)
  122.  
  123.  
  124.     {===== Row#3: Mid Mouse Modes =========}    
  125.     DrawRectangle(1,201,100,300)
  126.     DrawText(5,205,"Middle")
  127.     SetMidMouse(1,201,100,300,Mouse9,X,Y,
  128.         401,201,500,300,Mouse9,X,Y)
  129.  
  130.     DrawRectangle(101,201,200,300)
  131.     DrawText(105,205,"Shift Middle")
  132.     SetShftMidMouse(101,201,200,300,Mouse10,X,Y,
  133.             401,201,500,300, Mouse10,X,Y)
  134.  
  135.     DrawRectangle(201,201,300,300)
  136.     DrawText(205,205,"Ctrl Middle")
  137.     SetCtrlMidMouse(201,201,300,300,Mouse11,X,Y,
  138.              401,201,500,300, Mouse11,X,Y)
  139.  
  140.     DrawRectangle(301,201,400,300)
  141.     DrawText(305,205,"Dbl Middle")
  142.     SetDblMidMouse(301,201,400,300,Mouse12,X,Y)
  143.  
  144.     {A Microsoft Intellimouse or equivalent may not be present. Check and overwrite 
  145.       with a message if required.}
  146.     GetSystemMetrics(MOUSEBUTTONS,MouseBtns)
  147.     MouseBtns = 3  {MS Intellsense only reports 2, when 3 exist}
  148.     If MouseBtns <> 3
  149.         UseFont("Arial",13,23,NOBOLD,NOITALIC,NOUNDERLINE,0,0,255)
  150.         DrawShadowText(40,240,"No Middle button detected",0,0,0,1)
  151.         SetMidMouse()
  152.         SetShftMidMouse()
  153.         SetCtrlMidMouse()
  154.         SetDblMidMouse()
  155.     Endif
  156.     Goto Wait_for_Input
  157.  
  158. Mouse1:
  159.     DrawStatusWinText(0,"Left Mouse pressed")
  160.     DrawIcon(X,Y,16,16,ICON01)
  161.     Goto Wait_for_Input
  162. Mouse2:
  163.     DrawStatusWinText(0,"Shift Left Mouse pressed")
  164.     DrawIcon(X,Y,16,16,ICON02)
  165.     Goto Wait_for_Input
  166. Mouse3:
  167.     DrawStatusWinText(0,"Control Left Mouse pressed")
  168.     DrawIcon(X,Y,16,16,ICON03)
  169.     Goto Wait_for_Input
  170. Mouse4:
  171.     DrawStatusWinText(0,"Double Left Mouse pressed")
  172.     DrawIcon(X,Y,16,16,ICON04)
  173.     Goto Wait_for_Input
  174. Mouse5:
  175.     DrawStatusWinText(0,"Right Mouse pressed")
  176.     DrawIcon(X,Y,16,16,ICON05)
  177.     Goto Wait_for_Input
  178. Mouse6:
  179.     DrawStatusWinText(0,"Shift Right Mouse pressed")
  180.     DrawIcon(X,Y,16,16,ICON06)
  181.     Goto Wait_for_Input
  182. Mouse7:
  183.     DrawStatusWinText(0,"Control Right Mouse pressed")
  184.     DrawIcon(X,Y,16,16,ICON07)
  185.     Goto Wait_for_Input
  186. Mouse8:
  187.     DrawStatusWinText(0,"Double Right Mouse pressed")
  188.     DrawIcon(X,Y,16,16,ICON08)
  189.     Goto Wait_for_Input
  190. Mouse9:
  191.     DrawStatusWinText(0,"Middle Mouse pressed")
  192.     DrawIcon(X,Y,16,16,ICON09)
  193.     Goto Wait_for_Input
  194. Mouse10:
  195.     DrawStatusWinText(0,"Shift  Middle Mouse pressed")
  196.     DrawIcon(X,Y,16,16,ICON10)
  197.     Goto Wait_for_Input
  198. Mouse11:
  199.     DrawStatusWinText(0,"Control Middle Mouse pressed")
  200.     DrawIcon(X,Y,16,16,ICON11)
  201.     Goto Wait_for_Input
  202. Mouse12:
  203.     DrawStatusWinText(0,"Double Middle Mouse pressed")
  204.     DrawIcon(X,Y,16,16,ICON12)
  205.     Goto Wait_for_Input
  206.  
  207.  
  208.